package com.gitee.huanminabc.ddd.spring.filter;

import org.springframework.stereotype.Component;

import javax.servlet.*;
import java.io.IOException;

/**
 * @Description: 过滤器
 * @Author huanmin
 * @Date 2024/6/5 上午10:51
 */
@Component
//@Order(-Integer.MAX_VALUE)//数值越小越靠前
public class DemoServletRequestFilter implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        //调用下一个过滤器
        filterChain.doFilter(servletRequest, servletResponse);
    }

    @Override
    public void destroy() {

    }

}
